/*	kd:
	Network events for some reason only allow sending up to three ints, so I
	guess this'll have to do for now. */

class Gc_Bits {
	// PRO HACKING:
	static uint _2_16in32 (uint x, uint y) {
		return (x & 0xffff) | ((y & 0xffff) << 16);
	}
	
	// SUPER PRO HACKING:
	static uint _4_8in32 (uint a, uint b, uint c, uint d) {
		return	 (a & 0xff)
			|	((b & 0xff) << 8)
			|	((c & 0xff) << 16)
			|	((d & 0xff) << 24);
	}
	
	// NEO HACKING:
	static uint _2_8_1_16in32 (uint a, uint b, uint x) {
		return	 (a & 0x00ff)
			|	((b & 0x00ff) << 8)
			|	((x & 0xffff) << 16);
	}
	
	// THIS FUNCTION BROUGHT TO YOU BY CASPAR THE GHOST:
	static uint, uint             _32to2_16     (uint x) {
		return	(x & 0xffff),
				(x & 0xffff0000) >> 16;
	}
	
	// AND HIS MOM:
	static uint, uint, uint       _32to2_8_1_16 (uint x) {
		return	(x & 0xff),
				(x & 0xff00) >> 8,
				(x & 0xffff0000) >> 16;
	}
	
	// HOOOHOOOHOOOHOOO
	static uint, uint, uint, uint _32to4_8      (uint x) {
		return	(x & 0xff),
				(x & 0xff00) >> 8,
				(x & 0xff0000) >> 16,
				(x & 0xff000000) >> 24;
	}
}